import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { OmService } from './om.service';
import { CreateOmDto } from './dto/create-om.dto';
import { UpdateOmDto } from './dto/update-om.dto';

@Controller('om')
export class OmController {
  constructor(private readonly omService: OmService) {}

  @Post()
  create(@Body() createOmDto: CreateOmDto) {
    return this.omService.create(createOmDto);
  }

  @Get()
  findAll() {
    return this.omService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.omService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateOmDto: UpdateOmDto) {
    return this.omService.update(+id, updateOmDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.omService.remove(+id);
  }
}
